home *** CD-ROM | disk | FTP | other *** search
/ Nautilus 1992 July / Nautilus-3-8 / Nautilus-3-8.bin / Tools & Utilities / Techy Stuff / Frontier Scripts / menu mgr. script < prev    next >
Encoding:
Text File  |  1992-06-12  |  1.5 KB  |  36 lines

  1. Enclosure: mymenus
  2.  
  3.     Here's a neat script for those of you that add a lot of menus to Frontier
  4. and clutter up your menubar.
  5.  
  6.     The enclosed object export will install itself into a table called:
  7. "system.mymenus".  This table contains the script called "installremovemymenu"
  8. and a sample menu,
  9.  
  10.     "installremovemymenu" takes an address of a menubar variable and checks to
  11. see if it is currently installed.  If it is, it removes it.  If it isn't, it
  12. installs it.  I use this to install my special menus when I need them, and
  13. remove them when they get in the way.
  14.  
  15.     After you have imported the script, go to the menubar editor.  Add a menu
  16. item called "My Menus" to the "Custom".  This will be a hierarchical menu you
  17. will use to load and unload the menus.  Now add an item called "Sample" to the
  18. "My Menus" item, thus making it hierarchical.  Now click on the "Script" button
  19. and type in the following into the script window:
  20.  
  21.     system.mymenus.installremovemymenu(@system.mymenus.SampleMenu)
  22.  
  23.     Close the window, close the menubar editor, and go to the Custom menu.
  24. You'll notice the "My Menus" item.  Select it and it should pop up with the
  25. "Sample" item.  Select the "Sample" item and you'll see the Sample menu appear
  26. in the menubar.  Select it again, and the menu disappears.
  27.  
  28.     You'll want to make your own menus, so just add them to the
  29. "system.mymenus" table and add the appropriate item using the menubar editor.
  30.  
  31.     Requires Frontier 1.0b3 or greater.  If there are any problems, or you have
  32. suggestions, please feel free to link me.
  33.  
  34. Mark
  35. Author: D1180
  36.